<?php
require_once '../registro_ds/conexao_ciec.php';
require_once '../registro_ds/funcoes.php'; 
$registro = $_GET['registro'];
$contador = $_GET['cont'];

$query = mysql_query("select
r.id,
r.esc_id,
re.idInstituicao,
ra.noRa,
r.nome,
r.diploma,
r.escola_cursada,
r.rg,
r.org_exp,
r.mae,
r.pai,
r.obs,
r.data_atual
from reg_d r,redeparticular re,regiaoadministrativa ra
where r.id={$registro}
and r.esc_id=re.idEscola
and re.idRegiao=ra.idRa") or die("Erro ao selecionar registro - ".mysql_error());

$dados = mysql_fetch_array($query);


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Registro de Secret&aacute;rio</title>
<link rel="stylesheet" type="text/css" href="../css/public.css">
<style type="text/css">
body {
	background-color: #063;
	background-image: url(../images/azul.jpg);
}
body,td,th {
	color: #000;
}
</style>

</head>

<body>
<table width="900" border="1" align="center">
  <tr>
    <td bgcolor="#CCCCCC"><p>&nbsp;</p>
      <table width="765" border="0" align="center">
      <tr>
        <td width="152" align="right" bgcolor="#FFFFFF"><strong>IE:</strong></td>
        <td colspan="4" bgcolor="#FFFFFF">
          <input name="ie" type="text" id="ie" value="<?php echo $dados['idInstituicao'];?>" size="90" maxlength="100" /></td>
        <td width="53" align="right" bgcolor="#FFFFFF"><strong>Registro:</strong></td>
        <td width="53" bgcolor="#FFFFFF"><input name="registro" type="text" id="registro" value="<?php echo $contador;?>" size="5" maxlength="5" /></td>
      </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF"><strong>RA:</strong></td>
        <td colspan="4" bgcolor="#FFFFFF"><label>
          <input name="ra" type="text" id="ra" value="<?php echo $dados['noRa'];?>" size="90" />
        </label></td>
        <td colspan="2" rowspan="3" align="center" valign="middle" bgcolor="#FFFFFF"></td>
      </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF"><strong>Nome:</strong></td>
        <td colspan="4" bgcolor="#FFFFFF">
          <input name="nome" type="text" id="nome" value="<?php echo $dados['nome'];?>" size="90" maxlength="100" /></td>
      </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF"><strong>N&ordm; Registro:</strong></td>
        <td width="101" align="right" bgcolor="#FFFFFF"><strong>Diploma:</strong></td>
        <td width="123" bgcolor="#FFFFFF">
          <input name="diploma" type="text" id="diploma" value="<?php echo $dados['diploma'];?>" size="25" maxlength="50" /></td>
        <td width="56" align="right" bgcolor="#FFFFFF">&nbsp;</td>
        <td width="37" bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
      
      <tr>
        <td align="right" bgcolor="#FFFFFF"><strong>Escola em que Cursou:</strong></td>
        <td colspan="4" bgcolor="#FFFFFF">
          <input name="escola_cursada" type="text" id="escola_cursada" value="<?php echo $dados['escola_cursada'];?>" size="80" maxlength="100" /></td>
        <td colspan="2" rowspan="2" align="center" valign="middle" bgcolor="#FFFFFF"><p> <strong>D.Atualiza&ccedil;&atilde;o:</strong></p>
          <p>
            <input name="data_atual" type="text" id="data_atual" value="<?php echo dataBR($dados['data_atual']);?>" size="10" maxlength="10" />
          </p></td>
      </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF"><strong>RG:</strong></td>
        <td bgcolor="#FFFFFF">
          <input name="rg" type="text" id="rg" value="<?php echo $dados['rg'];?>" size="20" maxlength="50" /></td>
        <td align="right" bgcolor="#FFFFFF"><strong>Org. Exp:</strong></td>
        <td bgcolor="#FFFFFF"><input name="org_exp" type="text" id="org_exp" value="<?php echo $dados['org_exp'];?>" size="20" maxlength="50" /></td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF"><strong>M&atilde;e:</strong></td>
        <td colspan="4" align="left" bgcolor="#FFFFFF">
          <input name="mae" type="text" id="mae" value="<?php echo $dados['mae'];?>" size="90" maxlength="100" /></td>
        <td colspan="2" bgcolor="#FFFFFF"><div align="center">
          <label></label>
        </div></td>
        </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF"><strong>Pai:</strong></td>
        <td colspan="4" align="left" bgcolor="#FFFFFF">
          <input name="pai" type="text" id="pai" value="<?php echo $dados['pai'];?>" size="90" maxlength="100" /></td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF"><strong>Observa&ccedil;&atilde;o:</strong></td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td colspan="4" bgcolor="#FFFFFF">
          <textarea name="obs" id="obs" cols="70" rows="5"><?php echo $dados['obs'];?>
</textarea></td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
    </table>
    <p>&nbsp;</p></td>
  </tr>
</table>
<p>&nbsp; </p>
<p>&nbsp;</p>
</body>
</html>
